package com.example.cachedemo.service.dto.check;

import com.example.cachedemo.service.dto.ClassInfo;

public class ClassCheckAbsentDTO {
    //班级代码
    String ClassNo;
    //班级名称
    String className;
    //学期
    String termNo;
    //旷课总次数
    Integer classAbsentCount;
    //所在部门旷课总次数
    Integer depAbsentCount;
    //旷课总占比
    Float absentRadio;
    //总时长
    Long totalTime;

    public String getClassNo() {
        return ClassNo;
    }

    public void setClassNo(String classNo) {
        ClassNo = classNo;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getTermNo() {
        return termNo;
    }

    public void setTermNo(String termNo) {
        this.termNo = termNo;
    }

    public Integer getClassAbsentCount() {
        return classAbsentCount;
    }

    public void setClassAbsentCount(Integer classAbsentCount) {
        this.classAbsentCount = classAbsentCount;
    }

    public Integer getDepAbsentCount() {
        return depAbsentCount;
    }

    public void setDepAbsentCount(Integer depAbsentCount) {
        this.depAbsentCount = depAbsentCount;
    }

    public Float getAbsentRadio() {
        return absentRadio;
    }

    public void setAbsentRadio(Float absentRadio) {
        this.absentRadio = absentRadio;
    }

    public Long getTotalTime() {
        return totalTime;
    }

    public void setTotalTime(Long totalTime) {
        this.totalTime = totalTime;
    }

    public ClassCheckAbsentDTO() {
    }

    public ClassCheckAbsentDTO(ClassInfo classInfo,
                               String termNo, Integer classAbsentCount, Integer depAbsentCount) {
        this.setClassNo(classInfo.getClassNo());
        this.setClassName(classInfo.getClassName());
        this.setClassAbsentCount(classAbsentCount);
        this.setDepAbsentCount(depAbsentCount);
        this.setAbsentRadio((float) this.classAbsentCount / this.depAbsentCount);
        this.setTermNo(termNo);
    }
}